//
// C++ Interface: checkbox
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//

namespace xgui
{
    %feature("docstring","derives from :class:`xgui.WidgetClass` ") CheckboxClass;
	struct CheckboxClass : public xgui::WidgetClass
	{
		CheckboxClass();
		std::string const &className();
		bool isInstanceable();
		xgui::Object * create(xgui::Object * parent, xgui::StringMap &properties);
	};

    %feature("docstring","derives from :class:`xgui.Widget` \n\n**DESCTIPTION**\n\nThe Checkbox is a widget that display a checkbox input.This class cannot be directly instantiated, but must be created using the :meth:`xgui.Master.CreateCheckbox()` function.\n\n**PROPERTIES**\n\n * **text** *(RW):* sets or retrieves the text displayed\n\n * **value** *(RW):* sets or retrieves the value of the checkbox\n\n * **checked** *(RW):* sets or retrieves the default checked\n\n * **alignment** *(RW):* set or retrieves checkbox alignment.\n\n**METHODS**\n\n") Checkbox;
	class Checkbox : public xgui::Widget
	{
		protected:
			Checkbox(xgui::Container * parent, std::string const &text);
			virtual ~Checkbox();

		public:
		    %feature("docstring","returns the value assigned to the checkbox\n\n*C++*::\n\n std::string const &getValue();\n\n") getValue;
			std::string const &getValue();
			%feature("docstring","assigns a value to the checkbox (the value will be passed as a parameter to the *\"onclick\"* event callback)\n\n*C++*::\n\n void setValue(std::string const &);\n\n") setValue;
			void setValue(std::string const &);
	};
}

%extend xgui::Checkbox {
	%pythoncode {
		def __del__(self):
			if self.valid: self.delPyOwner(self)
	}
}

